package com.ff.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ff.dao.FuserDao;
import com.ff.model.Fuser;

@Service
public class FuserService {
	@Autowired
	private FuserDao fdao;
	public void setFdao(FuserDao fdao) {
		this.fdao = fdao;
	}
	public Fuser login(String username,String upassword) {
		return fdao.login(username, upassword);
}

public int register1(Fuser fuser) {
	return fdao.register1(fuser);
}

public int updateupd(int uid,String username,String upassword) {
	return fdao.updateupd(uid, username, upassword);
}

public int update1(Fuser fuser) {
	return fdao.update1(fuser); 
}

public int delete1(int uid) {
	return fdao.delete1(uid);
}
public int find_() {
	List<Fuser> list=fdao.select_();
	int a=15;
	int b=list.size();
	int c=(b/a)+1;
	return c;
}
public List<Fuser> find_limit(int id) {
	int id1=1;
	int cnt1=15;
	if(id!=0) {
		id1=id;
	}
	int id2=(id1-1)*cnt1;
	return fdao.select_limit(id2, cnt1);
}

public Fuser find11(int id) {
	return fdao.find11(id);
}

}
